package com.yuexun.dhdoctor.module.login.model.impl;


import com.yuexun.dhdoctor.module.login.api.LoginApi;
import com.yuexun.dhdoctor.module.login.model.IMenuPhoneModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/12/12.
 */
public class MenuPhoneModel implements IMenuPhoneModel {
    private LoginApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public LoginApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(LoginApi.class);
        }
    }

    @Override
    public Observable<String> getMenuPhone(Map<String, String> praise) {
        api = ApiInstance();
        return api.getMenuPhone(praise);
    }
}
